﻿using QntPlatform.BinanceApi;
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq.Dynamic.Core;
using System.Linq;
using System.Linq.Dynamic.Core.CustomTypeProviders;

namespace QntPlatform
{

    [DynamicLinqType]
    public static class fun
    {
        public static bool show2(string obj)
        {
            StrParse strParse = new StrParse();
            var re = strParse.ToText(obj);
            Console.WriteLine(re);
            return true;
        }

        public static int ParseAsInt(string value)
        {
            if (value == null)
            {
                return 0;
            }

            return int.Parse(value);
        }

    }
    public  class Module
    {
        ILog log=LogManager.GetLogger(nameof(Module));
        public void Init() { 
        }
        public void Run() {
            try
            {
                var list=SysApi.Api.GetRobotList(0, 0, 0, null);
                foreach (var item in list)
                {
                  //  SysApi.Api.RestartRobot(item.Id);
                }
            }
            catch (Exception ex)
            {
                log.Error(ex);
                throw;
            }
        }
        
        public void Stop() { 
        
        }
    }

     
}
